--hypertext technique by Steve Drazga, ART Incorporated
--if you use this in your scripts please include these 2 lines.
--
--
--edited by Mark Spaulding
--
global selectedWord
if selection is not empty then --something was selected
put selection into SelectedWord
if space is in selection then --the user selected more than 1 word
click at loc of target --so we will clear the selection
exit mousewithin --and exit to wait for another selection
end if
--check to see if word is in index field
if selectedWord = word 1 of card field "index" or selectedWord = word 2 of card field "index" or selectedWord = word 3 of card field "index" or selectedWord = word 4 of card field "index" or selectedWord = word 5 of card field "index" or selectedWord = word 6 of card field "index" or selectedWord = word 7 of card field "index" then
set visible of card field selectedWord to true
click at loc of target --so we will clear the selection
else
click at loc of target --so we will clear the selection
beep
answer quote&selectedword"e&&"didn’t have an asterisk." with "oops!"
end if
end if
end mousewithin
-- part 8 (field)
-- low flags: 80
-- high flags: 0002
-- rect: left=314 top=199 right=337 bottom=483
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: index
-- part 9 (field)
-- low flags: 81
-- high flags: 2004
-- rect: left=157 top=71 right=119 bottom=363
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 9
-- style flags: 256
-- line height: 12
-- part name: edited
----- HyperTalk script -----
on mouseDown
set visible of card field "edited" to not the visible of card field "edited"
end mouseDown
-- part 11 (field)
-- low flags: 81
-- high flags: 2004
-- rect: left=326 top=210 right=283 bottom=481
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 9
-- style flags: 256
-- line height: 12
-- part name: Spaulding
----- HyperTalk script -----
on mouseDown
set visible of card field "Spaulding" to not the visible of card field "Spaulding"
end mouseDown
-- part 12 (field)
-- low flags: 81
-- high flags: 2004
-- rect: left=39 top=172 right=316 bottom=147
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 9
-- style flags: 256
-- line height: 12
-- part name: Tools
----- HyperTalk script -----
on mouseDown
set visible of card field "Tools" to not the visible of card field "Tools"
end mouseDown
-- part 13 (field)
-- low flags: 81
-- high flags: 2004
-- rect: left=336 top=25 right=328 bottom=495
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 9
-- style flags: 256
-- line height: 12
-- part name: Thanks
----- HyperTalk script -----
on mouseDown
set visible of card field "Thanks" to false
end mouseDown
-- part 18 (button)
-- low flags: 00
-- high flags: A003
-- rect: left=206 top=240 right=297 bottom=299
-- title width / last selected line: 0
-- icon id / first selected line: 15120 / 15120
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Install Resources
----- HyperTalk script -----
on mouseUp
answer "Install External Resources in the Home Stack?" with "Install" or "Cancel"
if it is "cancel" then exit mouseUp
--This script comes from Stack Developer by Steve Drazga
--This script uses the ModResCopy XCMD. Do you know who wrote it?
put (long name of this stack) into sourceStack
delete first word of sourceStack
delete first character of sourceStack
delete last character of sourceStack
put "Please select your HOME Stack."
put filename("STAK") into fname
if fname is empty then
hide message window
exit mouseup
end if
if sourcestack=fname then
beep 2
Answer "Sorry! You can't install it in this stack"
Set visible of card field "last installed" to true
Set visible of card field "installed d/t" to true
put ConvertButtonName(fname) into shortName
put shortName&&"Stack" into line 2 of card field "last installed"
put the abbr time into line 1 of card field "installed D/T"
put the abbr date into line 2 of card field "installed D/T"
end mouseUp
--by Steve Drazga and Stack Developer
function ConvertButtonName LongName
put the length of LongName into nameLength
repeat with x = nameLength down to 1
if char x of LongName = ":" then exit repeat
end repeat
return char (x + 1) to nameLength of LongName
end ConvertButtonName
-- part 15 (field)
-- low flags: 81
-- high flags: 2004
-- rect: left=159 top=248 right=282 bottom=353
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 9
-- style flags: 256
-- line height: 12
-- part name: HyperCard
----- HyperTalk script -----
on mouseDown
set visible of card field "HyperCard" to not the visible of card field "HyperCard"
end mouseDown
-- part 16 (field)
-- low flags: 81
-- high flags: 2004
-- rect: left=387 top=21 right=141 bottom=512
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 9
-- style flags: 256
-- line height: 12
-- part name: resedit
----- HyperTalk script -----
on mouseDown
set visible of card field "resedit" to not the visible of card field "resedit"
end mouseDown
-- part 17 (field)
-- low flags: 81
-- high flags: 2004
-- rect: left=3 top=23 right=156 bottom=134
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 9
-- style flags: 256
-- line height: 12
-- part name: resources
----- HyperTalk script -----
on mouseDown
set visible of card field "resources" to not the visible of card field "resources"
end mouseDown
-- part 19 (field)
-- low flags: 81
-- high flags: 2002
-- rect: left=53 top=251 right=283 bottom=189
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 3
-- text size: 9
-- style flags: 256
-- line height: 12
-- part name: last installed
-- part 20 (field)
-- low flags: 81
-- high flags: 2002
-- rect: left=320 top=254 right=286 bottom=456
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 3
-- text size: 9
-- style flags: 256
-- line height: 12
-- part name: installed D/T
-- part contents for card part 3
----- text -----
ICON Buttons Stack by Mark Spaulding, 1988
-- part contents for card part 6
----- text -----
About ICON Buttons:
(Double-click on the word preceeding an asterisk for more information)
Ever since HyperCard* was introduced, I have wanted to add buttons that would launch external applications. This is simple enough, but assigning the
application’s ICN# to a button was a hassle. Therefore, in order to simplify this process, I edited* the two scripts that are at the heart of this stack.
•••••How the “Icon Button” Scripts work•••••
••Making an External Application Button••
When you type “appButton” (without the quotes) into the message box from ANY stack, you will be prompted with a Standard Application Package dialogue box to select the application you would like to assgin—along with its ICN#—to a HyperCard* Button. A few seconds later, you will be presented with a application button with the application’s ICN# changed into a ICON resource type. Simply drag the new button where you like, select the Browse Tool and Launch the external Application.
••Making an External Document Button••
When you type “docButton” (without the quotes) into the message box from ANY stack, you will be prompted with a Standard Application Package dialogue box to select the application which generated the document you would like to assign to a HyperCard* button. After completing the application selection, you will be presented with another Standard File Package dialogue box to select the Document—along with its ICN#—to assign to a HyperCard Button. A few seconds later, you will be presented with a Document button with the documents ICN# changed into a ICON resource type. Simply drag the new button were you like, select the Browse Tool and Launch the external Document.
••••How the “ICON Button” Stack Works••••
“ICON Buttons” is similar to another Stack I designed “Power Tools*.” However, unlike the “Power Tools*” stack, “ICON Buttons” needs a few external resources*. These resources* only need to be installed ONCE! (Installation is done by clicking the button below. NOTE: A card field will be generated providing the date that the resources* were installed into the Home stack). Even if you decide to remove the “ICON Button” scripts, the resources* will not automatically be removed from your home Stack along with the “ICON Button” scripts. You must remove the resources* with a resource mover like ResEdit*.
The “ICON Buttons” stack will automatically install or remove the “ICON Button” scripts at the click of a button (see the following card.) Simply click the “Install ICON Buttons” button and this stack will do the rest. If you decide to remove the “ICON button” scripts, simply click the aforementioned button again and the stack will remove the “ICON Button” scripts from your Home Stack.
Enjoy and Thanks*,
Mark Spaulding*
GEnie: M-SPAULDING*
-- part contents for card part 8
----- text -----
edited
Tools
Spaulding
Thanks
HyperCard
resedit
resources
-- part contents for card part 9
----- text -----
The basic design of the "ICON Buttons" scripts were taken from Stack Developer, by Steve Drazga.
-- part contents for card part 11
----- text -----
I can be reached at:
Yale Divinity School
Box 279
409 Prospect Street
New Haven, CT 06511
-- part contents for card part 12
----- text -----
The Power Tools stack will install a script that will enable the user to access all HyperCard tools from the Key- board. This stack can be found on GEnie.
-- part contents for card part 13
----- text -----
Special Thanks to:
Steve Drazga for Stack Developer and the hypertext technique. Also for helping me with a bug in the scripts;
and
J. Paul for GetAppIcon XFCN, GetDocIcon XFCN, & UpdateResFork XCMD;
S. Maller for FileName XFCN;
and whoever wrote ModResCopy XCMD;
Mark Mendel for the basic script installer; and
Jerry Daniels for the Crane ICON idea;
and Paul Lee for testing.
I think that covers everybody!
-- part contents for card part 15
----- text -----
Yes! I know. HyperCard™ is a trade mark of Apple Computer®.
-- part contents for card part 16
----- text -----
NOTE: Steve Maller’s ResCopy XCMD will NOT allow you to access the Home Stack. Therefore, you will need to use ResEdit, or Redit, or a similar application.